//
//  XGNewsModel.swift
//  TodayNews
//
//  Created by monkey on 2020/3/25.
//  Copyright © 2020 itcast. All rights reserved.
//

import HandyJSON

struct XGNewsModel: HandyJSON
{
    /// 标题
    var title: String?
    /// 文章
    var article_url: String?
    var display_url: String?
    /// 分享
    var share_url: String?
    /// 游标
    var cursor: UInt64 = 0
    /// 阅读量
    var read_count: Int = 0
    /// 发布时间
    var publish_time: UInt64 = 0
    /// 来源
    var source: String?
    /// 缩略图
    var image_list: [XGImageInfo]?
    /// 中图
    var middle_image: XGImageInfo?
    /// 大图
    var large_image_list: [XGImageInfo]?
    /// 是否有图
    var has_image: Bool = false
    /// 是否有视频
    var has_video: Bool = false
    /// 视频时长
    var video_duration: Int = 0
    /// 播放次数
    var video_watch_count: Int = 0
    /// 视频id
    var video_id: String?
    /// 用户信息
    var user_info: XGUserInfo?
    /// 时间标识 用来做刷新
    var behot_time: TimeInterval = 0
    
    mutating func mapping(mapper: HelpingMapper)
    {        
        mapper <<<
        self.video_watch_count <-- "video_detail_info.video_watch_count"
    }
}
